home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / QuickDraw3D 1.6 SDK / Mac SampleCode Previous / Grab Bag Samples - Mac / Current QD3D Libs & Headers / Interfaces / QTMLCustomElements.h < prev   
Encoding:
C/C++ Source or Header  |  1999-05-18  |  4.2 KB  |  158 lines  |  [TEXT/MPS ]

  1. /******************************************************************************
  2.  **                                                                              **
  3.  **     Module:        QTMLCustomElements.h                                     **                        
  4.  **                                                                              **
  5.  **                                                                              **
  6.  **     Purpose:     Custom Elements Interface File.                             **            
  7.  **                                                                              **
  8.  **                                                                              **
  9.  **     Copyright (C) 1997 Apple Computer, Inc.  All rights reserved.         **
  10.  **                                                                              **
  11.  **                                                                              **
  12.  *****************************************************************************/
  13. #ifndef QTMLCustomElements_h
  14. #define QTMLCustomElements_h
  15.  
  16. #include "QD3D.h"
  17.  
  18. #if defined(PRAGMA_ONCE) && PRAGMA_ONCE
  19.     #pragma once
  20. #endif  /*  PRAGMA_ONCE  */ 
  21.  
  22. #if defined(OS_MACINTOSH) && OS_MACINTOSH
  23.  
  24. #if defined(__xlc__) || defined(__XLC121__)
  25.     #pragma options enum=int
  26.     #pragma options align=power
  27. #elif defined(__MWERKS__)
  28.     #pragma enumsalwaysint on
  29.     #pragma options align=native
  30. #elif defined(__MRC__) || defined(__SC__)
  31.     #if __option(pack_enums)
  32.         #define PRAGMA_ENUM_RESET_CUSTOMELEMENTS 1
  33.     #endif
  34.     #pragma options(!pack_enums)
  35.     #pragma options align=power
  36. #endif
  37.  
  38. #endif  /* OS_MACINTOSH */
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif    /* __cplusplus */
  43.  
  44.  
  45. /******************************************************************************
  46.  **                                                                             **
  47.  **                                Export Control                                 **
  48.  **                                                                             **
  49.  *****************************************************************************/
  50.  
  51. #if defined(_MSC_VER)    /* Microsoft Visual C */
  52.     #if defined(WIN32_EXPORTING)    /* define when building DLL */
  53.         #define CE_EXPORT __declspec( dllexport )     
  54.         #define CE_CALL    
  55.         #define CE_CALLBACK    
  56.     #else
  57.         #define CE_EXPORT
  58.         #define CE_CALL    __cdecl
  59.         #define CE_CALLBACK    __cdecl    
  60.     #endif /* WIN32_EXPORTING */
  61. #else
  62.     #define CE_EXPORT
  63.     #define CE_CALL    
  64.     #define CE_CALLBACK    
  65. #endif  /*  _MSC_VER  */
  66.  
  67.  
  68. /******************************************************************************
  69.  **                                                                             **
  70.  **                        Name Data Structure Definitions                         **
  71.  **                                                                             **
  72.  *****************************************************************************/
  73.  
  74. #define    CEcNameElementName    "Apple Computer, Inc.:NameElement"
  75.  
  76.  
  77. /******************************************************************************
  78.  **                                                                             **
  79.  **                        Custom Name Element Functions                         **
  80.  **                                                                             **
  81.  *****************************************************************************/
  82.  
  83. CE_EXPORT TQ3Status CE_CALL CENameElement_SetData(
  84.     TQ3Object            object,
  85.     const char            *name);
  86.  
  87. CE_EXPORT TQ3Status CE_CALL CENameElement_GetData(
  88.     TQ3Object            object,
  89.     char                **name);
  90.  
  91. CE_EXPORT TQ3Status CE_CALL CENameElement_EmptyData(
  92.     char                **name);
  93.  
  94.  
  95. /******************************************************************************
  96.  **                                                                             **
  97.  **                            URL Data Structure Definitions                     **
  98.  **                                                                             **
  99.  *****************************************************************************/
  100.  
  101. #define    CEcUrlElementName        "Apple Computer, Inc.:URLElement"
  102.  
  103. typedef enum TCEUrlOptions {
  104.     kCEUrlOptionNone,
  105.     kCEUrlOptionUseMap
  106. } TCEUrlOptions;
  107.  
  108. typedef struct TCEUrlData {
  109.     char                *url;
  110.     char                *description;
  111.     TCEUrlOptions        options;
  112. } TCEUrlData;
  113.  
  114.  
  115. /******************************************************************************
  116.  **                                                                             **
  117.  **                        Custom URL Element Functions                         **
  118.  **                                                                             **
  119.  *****************************************************************************/
  120.  
  121. CE_EXPORT TQ3Status CE_CALL CEUrlElement_SetData(
  122.     TQ3Object            object,
  123.     TCEUrlData            *urlData);
  124.  
  125. CE_EXPORT TQ3Status CE_CALL CEUrlElement_GetData(
  126.     TQ3Object            object,
  127.     TCEUrlData            **urlData);
  128.  
  129. CE_EXPORT TQ3Status CE_CALL CEUrlElement_EmptyData(
  130.     TCEUrlData            **urlData);
  131.  
  132.  
  133. #ifdef __cplusplus
  134. }
  135. #endif    /* __cplusplus */
  136.  
  137.  
  138. #if defined(OS_MACINTOSH) && OS_MACINTOSH
  139.  
  140. #if defined(__xlc__) || defined(__XLC121__)
  141.     #pragma options enum=reset
  142.     #pragma options align=reset
  143. #elif defined(__MWERKS__)
  144.     #pragma enumsalwaysint reset
  145.     #pragma options align=reset
  146. #elif defined(__MRC__) || defined(__SC__)
  147.     #if PRAGMA_ENUM_RESET_CUSTOMELEMENTS
  148.         #pragma options(pack_enums)
  149.         #undef PRAGMA_ENUM_RESET_CUSTOMELEMENTS
  150.     #endif
  151.     #pragma options align=reset
  152. #endif
  153.  
  154. #endif  /* OS_MACINTOSH */
  155.  
  156. #endif    /* QTMLCustomElements_h */
  157.  
  158.